package com.hbnu.list;

public class ArrayDemoTest {
    public static void main(String[] args) {
        ArrayDemo arrayDemo = new ArrayDemo(4);

        arrayDemo.addData(0,"java");
        arrayDemo.addData(1,20);

        //在这里可能会出现问题,即类型转换会出现问题，但是编译时不会报错
        String data1 = (String) arrayDemo.getData(0);
        String data2 = (String) arrayDemo.getData(1);

        System.out.println(data1);
        System.out.println(data2);

    }
}






